import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'element-ui/lib/theme-chalk/display.css';
import '@/styles/index.scss' // global css
import App from './App'
import store from './store'
import router from './router'
import moment from 'moment'
import VueClipboard from 'vue-clipboard2'
import '@/icons' // icon
import '@/permission' // permission control

// import '../mock' // simulation data
Vue.use(ElementUI)
Vue.use(VueClipboard)
//  全局过滤器 时间戳
Vue.filter('dateFormatMin', function (dataStr, pattern = 'YYYY-MM-DD HH:mm') {
  if (dataStr) {
    return moment(dataStr).format(pattern)
  } else {
    return dataStr
  }
})
//  全局过滤器 时间戳
Vue.filter('dateFormatSec', function (dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
  if (dataStr) {
    return moment(dataStr).format(pattern)
  } else {
    return dataStr
  }
})


Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
